<%--
  Created by IntelliJ IDEA.
  User: wangjun
  Date: 2016/5/9
  Time: 09:09
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="core" uri="http://java.sun.com/jsp/jstl/core" %>
<core:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<body>
<div common-modal-form>

        <table class="table table-bordered">
            <tr>
                <td class="text-right col-xs-2">
                    支付机构：
                </td>
                <td class="col-xs-4" colspan="5">
                    <input type="text" ng-model="vm.item.companyCode" class="{{vm.constant.inputClass}}" required
                           name="companyCode"
                           typeahead-min-length="0"
                           uib-typeahead="item.key as item.value for item in vm.cached.COMANY_CODE | filter:$viewValue | limitTo:10">
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    合同编号：
                </td>
                <td colspan="5">
                    <input type="text" ng-model="vm.item.contCode" class="{{vm.constant.inputClass}}" required
                           w5c-unique-check="{url:'${ctx}/merchant/contaract/check?companyCode='+vm.item.companyCode+'&contCode='+vm.item.contCode}"
                           name="contCode">
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    合同名称 ：
                </td>
                <td colspan="5">
                    <input type="text" ng-model="vm.item.contName" class="{{vm.constant.inputClass}}">
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    合同概要：
                </td>
                <td colspan="5">
                    <input type="text" ng-model="vm.item.contSummary" class="{{vm.constant.inputClass}}">

                </td>
            </tr>
            <tr>
                <td class="text-right">
                    合同签订日期：
                </td>
                <td colspan="5">
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup
                           ng-model="vm.item.contSignedDate "
                           name="contSignedDate"
                           required/>
                </td>

            </tr>
            <tr>
                <td class="text-right">
                    合同生效日期：
                </td>
                <td colspan="5">
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup
                           ng-model="vm.item.contBgnDate"
                           name="contBgnDate"
                           required/>

                </td>
            </tr>
            <tr>
                <td class="text-right">
                    合同结束日期：
                </td>
                <td colspan="5">
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup
                           ng-model="vm.item.contEndDate"
                           name="contEndDate"
                           required/>

                </td>
            </tr>
            <tr>
                <td class="text-right">
                    签约机构：
                </td>
                <td colspan="5">
                    <input type="text" ng-model="vm.item.signedOrgCode" class="{{vm.constant.inputClass}}"/>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    企业代码：
                </td>
                <td colspan="5">
                    <input type="text" ng-model="vm.item.enterpriseCode" class="{{vm.constant.inputClass}}"/>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    合同附件：
                </td>
                <%--<td>--%>
                <%--<input type="file" ng-model="vm.item.dfsContAttach"class="{{vm.constant.inputClass}}" />--%>
                <%--</td>--%>
                <td>
                    <input nv-file-select="" type="file" options="vm.fileItems[0]" uploader="vm.fileUploader"/>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    开户行许可证：
                </td>
                <td>
                    <%--<input type="file" ng-model="vm.item.dfsOpenBankCert"class="{{vm.constant.inputClass}}" />--%>
                    <input nv-file-select="" type="file" options="vm.fileItems[1]" uploader="vm.fileUploader"/>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    一般纳税人证书：
                </td>
                <td>
                    <%--<input type="file" ng-model="vm.item.dfsRatePayerCert"class="{{vm.constant.inputClass}}" />--%>
                    <input nv-file-select="" type="file" options="vm.fileItems[2]" uploader="vm.fileUploader"/>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    税务登记证：
                </td>
                <td>
                    <%--<input type="file" ng-model="vm.item.dfsTaxRegisterCert"class="{{vm.constant.inputClass}}" />--%>
                    <input nv-file-select="" type="file" options="vm.fileItems[3]" uploader="vm.fileUploader"/>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    营业执照：
                </td>
                <td>
                    <%--<input type="file" ng-model="vm.item.dfsBizLicenseCert"class="{{vm.constant.inputClass}}" />--%>
                    <input nv-file-select="" type="file" options="vm.fileItems[4]" uploader="vm.fileUploader"/>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    组织机构代码证：
                </td>
                <td>
                    <input nv-file-select="" type="file" options="vm.fileItems[5]" uploader="vm.fileUploader"/>
                    <%--<input type="file" ng-model="vm.item.dfsOrganizationCodeCert"class="{{vm.constant.inputClass}}" />--%>
                </td>
            </tr>
            <tr>
                <td class="text-right">
                    银行基本信息表：
                </td>
                <td>
                    <input nv-file-select="" type="file" options="vm.fileItems[6]" uploader="vm.fileUploader"/>
                    <%--<input type="file" ng-model="vm.item.dfsBankFile"class="{{vm.constant.inputClass}}" />--%>
                </td>
            </tr>
            <tr>
                <td><h4>当前队列 ({{ vm.fileUploader.queue.length }})</h4></td>
            </tr>
            <tr>
                <th width="25%">文件名</th>
                <th ng-show="vm.fileUploader.isHTML5">大小</th>
                <th ng-show="vm.fileUploader.isHTML5">进度</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            <tr ng-repeat="item in vm.fileUploader.queue">
                <td><strong>{{ item.file.name }}</strong></td>
                <td ng-show="vm.fileUploader.isHTML5" nowrap>{{ item.file.size/1024|number:2 }} KB</td>
                <td ng-show="vm.fileUploader.isHTML5">
                    <div class="progress" style="margin-bottom: 0;">
                        <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                    </div>
                </td>
                <td class="text-center">
                    <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                    <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                    <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                </td>
                <td nowrap>
                    <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()"
                            ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                        <span class="glyphicon glyphicon-upload"></span>
                    </button>
                    <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()"
                            ng-disabled="!item.isUploading">
                        <span class="glyphicon glyphicon-ban-circle"></span>
                    </button>
                    <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                        <span class="glyphicon glyphicon-trash"></span>
                    </button>
                </td>
            </tr>
        </table>

</div>
</body>
</html>
